<?php
include_once(dirname(__FILE__)."/../../src/ChangeUserData.php");
include_once(dirname(__FILE__)."/../../src/EditUserData.php");
include_once(dirname(__FILE__)."/../../src/config.inc.php");


class Test038_EditUserdata extends UnitTestCase
{
 
 function test_edit()
 {
 	MYSQL_CONNECT(DB_SERVER,DB_USER_NAME,DB_USER_PASSWORD) OR DIE("Datenbankverbindung konnte nicht hergestellt werden!");
	@mysql_select_db(DB_NAME) or die("Datenbank nicht gefunden!"); 
	
	$userdata = new EditUserData();
	$userdata->edit('First', 'Last', 'Adressen', '8010', 'Stadt', 'Land', '0000', 'Arbeitgeber', 'Mail@host.net', 'Titel', 'www.homepage.com', 'Position', 1);
	
 	$query = "Select * FROM userdata WHERE firstname = 'First' AND lastname = 'Last' AND address = 'Adressen' AND postcode = '8010' AND country ='Land' AND city = 'Stadt' AND phone = '0000' AND employer = 'Arbeitgeber' AND mail = 'Mail@host.net' AND title = 'Titel' AND homepage = 'www.homepage.com' AND position = 'Position'";
  $result = MYSQL_QUERY($query);
	$num_rows =  mysql_num_rows($result);
 	$this->assertNotNull($num_rows);
 }
}
?>
